package com.powernode.client;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.powernode.back.MethodFallBack;
import com.powernode.commons.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 客户端(生产者的方法名,形参, 访问路径)
 * 动态代理
 *
 */
@FeignClient(value = "user-server",fallback = MethodFallBack.class) //生产者注册到eureka注册中心的名称
public interface UserClient {

	@HystrixCommand
	@RequestMapping("/user/items")
	Result findByList();
}
